package com.qigao.mall.jdbc.mapper;

import com.qigao.mall.commons.dto.ProfitCondDto;
import com.qigao.mall.jdbc.model.TbBonusDetail;
import com.qigao.mall.jdbc.model.TbProfitDetail;
import com.qigao.mall.jdbc.model.TbSettleDetail;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface TbProfitDetailMapper extends AbstractTbProfitDetailMapper {

    void insertBatch(List<TbProfitDetail> tbProfitDetails);

    TbProfitDetail selectByUniqIndex(@Param("settleDate") Date settleDate, @Param("userLevel") String userLevel, @Param("userNo") String userNo, @Param("itemCode") String itemCode);

    void addAmtById(TbProfitDetail tbProfitDetail);

    List<TbBonusDetail> selectProfitGroup(Date settleDate);

    TbProfitDetail selectUserProfit(@Param("userNo")String userNo, @Param("settleDate")Date settleDate);

    List<TbProfitDetail> selectByCond(ProfitCondDto profitCondDto);

    List<TbSettleDetail> selectSettleGroup(Date settleDate);

}